-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
부산대 Android 김민혁 4주차 과제 STEP1 #54
base: kyleidea1
Are you sure you want to change the base?
Conversation
- Added a new view 'activity_search.xml' which includes a simple search bar layout using SearchView.
- Added SearchMainActivity which is activity for activity_search.xml
These data would be results of searching.
Added information related to local database.
- Renamed DBHelper to PlaceDBHelper - Added PlaceDBHelper class with methods to create the PlaceTable and insert initial place data - Implemented the SearchHistoryDBHelper class to manage search history in a new SearchHistoryTable - Added methods to insert, delete, and retrieve search history entries Closes #789
- Moved the Place data class from PlaceDBHelper to its own file for better code organization.
…history - Implemented SearchHistoryRecyclerViewAdapter to manage and display search history items in a RecyclerView. - Added ViewHolder class for binding search history items and handling item clicks and deletions. - Updated onBindViewHolder to handle click events for item selection and deletion, including updating the RecyclerView.
…esults - Updated the filtering logic in SearchActivity to correctly filter search results based on the entered query. - reset previous commits by hard option to find error. recommit normally operating files(activity_search.xml, AndroidManifest.xml, DBHelper.kt, SearchMainActivity.kt)
- Extracted PlaceDBHelper for managing the PlaceTable database operations. - Extracted SearchHistoryDBHelper for managing the SearchHistoryTable database operations. - Deleted DBHelper.kt which previously contained combined functionality.
- Updated visibility attribute of RecyclerView with ID 'recycler_view' to 'visible' to ensure search results are displayed correctly. - Adjusted visibility attribute of TextView with ID 'no_results' to 'gone' to hide the message when search results are present. - To fix visibility bug of no_result.
…rations accordingly
…rations accordingly
- Added Place, PlaceMeta, RegionInfo, and ResultSearchKeyword data classes - Represents the structure of data received from Kakao Local API
- Created KakaoLocalApi interface defining API endpoints - Implemented searchKeyword function to fetch search results from Kakao API
…o API - Implemented KakaoRepository class to handle API requests and responses - Includes searchKeyword function to fetch search results asynchronously
- Created a new application class `KyleMaps` to initialize the Retrofit instance. - Added KyleMaps into AndroidManifest.xml
- Added icon image assets and added into AndroidManifest.xml
Removed activity_main_search to improve code maintainability and reduce unused resources.
Removed PlaceDBHelper.kt as PlaceDB became useless
Replaced Place.kt and added PlaceMeta.kt, RegionInfo.kt, SearchActivity.kt
Added KakaoRepository.kt to get sources using Kakao API
Added KyleMaps.kt which is instance of Application class of entire application.
Added arrow_back.xml and ic_search.xml to use at map activity layout
Added MapActivity.kt and activity_map.xml Modified AndroidManifest.xml
- Updated readme for STEP1 of android-map-location
- MapActivity displays clicked item's location
- Does not appear until selecting an item in the result recycler view - image source: location_marker.png, with a text refers name of the place
…n app restarted - Focus same place as the last place before termination of application - remember position using sharedPreference
- AuthenticationErrorActivity.kt - activity_authentication_error.xml - and images in these files
- bottom_sheet_background.xml, layout_map_bottom_sheet_dialog.xml - Added variables related to bottom sheet
- Added finish() part in eventListner of searchButton in MapActivity - Now MapActivities doesn't stack
# Conflicts: # app/src/main/java/campus/tech/kakao/map/SearchActivity.kt
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_map) | ||
|
||
mapView = findViewById(R.id.map_view) | ||
searchButton = findViewById(R.id.search_button) | ||
val bottomSheetLayout = layoutInflater.inflate(R.layout.layout_map_bottom_sheet_dialog, null) | ||
bottomSheet = BottomSheetDialog(this) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
미리 셋팅해야할게 있는게 아니라면
bottomSheet가 필요할때 객체를 생성하는건 어떨까요?
|
||
val defLat = "35.231627" | ||
val defLng = "129.084020" | ||
val lastLatLng = getSharedPreferences("lastLatLng", MODE_PRIVATE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sharedPreference에선 double형을 읽고 쓸수가 없어서 string type으로 관리하셨군요
잘 하셨는데 읽고 쓰는부분을 캡슐화하면 어떨까요?
함수도 좋고 클래스도 좋습니다. 내부에서 string으로 관리하는지는 상관하지 않고
사용하는곳에서는 double로 간단히 쓸수 있게끔요
// Intent에서 값을 가져옴 | ||
intent?.let { | ||
latitude = it.getStringExtra("mapY") ?: latitude | ||
longitude = it.getStringExtra("mapX") ?: longitude |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intent extra에 들어가는 key값들은 보내는쪽과 받는쪽 둘다 사용하기에 상수로 관리하시면 좋습니다
나중에 바뀔일이 생기면 추적하기 힘들어져서요
이미 Step2를 만들어주셔서 이 PR은 머지 안할게요~ |
STEP 1 완료했습니다!
추가로 제가 지금까지 실수로 다른 main 브랜치에 pr을 넣어서 리뷰요청이 안 갔었습니다. 죄송합니다..!